from redis import StrictRedis
class Config:
    DEBUG = True
    SECRET_KEY = 'heyKyqaUgg8jAJJviwxy3bUCkBFBX5ao3kKOHLptbW8='
    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@localhost/python3'
    # 配置数据库的动态追踪修改
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    REDIS_HOST = '127.0.0.1'
    REDIS_POST = 6379

    SESSION_TYPE = 'redis'
    SESSION_USE_SIGNER = True
    SESSION_REDIS = StrictRedis(host=REDIS_HOST,port=REDIS_POST)
    PERMANENT_SESSION_LIFETIME = 86400

class developmentConfig(Config):
    DEBUG = True

class productionConfig(Config):
    DEBUG = True

config = {
    'development':developmentConfig,
    'production':productionConfig
}